<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
        #box{
            width: 200px;
            height: 200px;
            border: 1px solid #000;
        }
    </style>
</head>
<body>
    <h1>JS 获取页面中的元素对象</h1>
    <hr>

    <div id="box"></div>

    <script>
    var box = document.getElementById('box');

    console.log(box);
    console.log(typeof(box));

    box.style.backgroundColor = '#f00';
    box.style.color = '#ff0';
    box.innerHTML = 'Hi~ o(*￣▽￣*)ブ , 艳艳';

    console.log(box.innerHTML);


    </script>
</body>
</html>